package cn.chainco.cts.jdo;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 委托项目表
 */
@Entity
@Table(name = "cts_item")
public class Item implements Serializable {

	private static final long serialVersionUID = -8475045826892955708L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "companyId")
	private Company company; // 公司

	@Transient
	private String name; // 名称

	@Column(length = 50, nullable = false)
	private String name_zh; // 中文描述

	@Column(length = 50, nullable = false)
	private String name_en; // 英文描述

	@Column
	private Integer type; // 项目类型：1-5.系统默认五类；6.货物加工；7.文件处理；8.短途运输

	@Column
	private Integer status = 0; // 状态：0正常；1禁用

	@Column(length = 100)
	private String fees; // 非系统默认五类时设置的相关费用，多个费用用逗号隔开
	
	@Transient
	private List<Fee> option1; // 可选临时字段

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getName() {
		return this.getName_zh();
		//return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName_zh() {
		return name_zh;
	}

	public void setName_zh(String name_zh) {
		this.name_zh = name_zh;
	}

	public String getName_en() {
		return name_en;
	}

	public void setName_en(String name_en) {
		this.name_en = name_en;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getFees() {
		return fees;
	}

	public void setFees(String fees) {
		this.fees = fees;
	}

	public List<Fee> getOption1() {
		return option1;
	}

	public void setOption1(List<Fee> option1) {
		this.option1 = option1;
	}

}
